package com.wzx.data.entity;
import com.baomidou.mybatisplus.annotation.TableField;
import com.wzx.basics.baseClass.BaseEntity;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.ApiModel;
import lombok.Data;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.util.List;

/**
 * @author wzx
 */
@Data
@Table(name = "a_subject")
@TableName("a_subject")
@ApiModel(value = "科目表")
public class Subject extends BaseEntity {
    private static final long serialVersionUID = 1L;
    /**
     * 科目名
     */
    private String name;

    /**
     * 父Id
     */
    private String parentId;

    /**
     * 排序字段
     */
    private Integer sort;

    /**
     * 介绍
     */
    private String description;
    /**
     * 层级
     */
    private Integer level;
    /**
     * 状态 0:启用 1：禁用
     */
    private Integer status;
    @TableField(exist = false)
    private boolean hasChildren;
    @Transient
    @TableField(exist=false)
    @ApiModelProperty(value = "子菜单列表")
    private List<Subject> children;


}